package com.lvcoding.miaoshademo.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 库存表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@TableName(value = "stock")
public class Stock implements Serializable {
    /**
     * 主键id
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 库存
     */
    @TableField(value = "count")
    private Integer count;

    /**
     * 已售
     */
    @TableField(value = "sale")
    private Integer sale;

    /**
     * 乐观锁，版本号
     */
    @Version
    @TableField(value = "version")
    private Integer version;

    private static final long serialVersionUID = 1L;

}
